﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
    targetNamespace="http://www.dotnetage.com/XML/Schema/template"
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wp="http://www.dotnetage.com/XML/Schema/page"
    xmlns:wb="http://www.dotnetage.com/XML/Schema/template"
>
  <xs:import namespace="http://www.dotnetage.com/XML/Schema/page" />
  <xs:import namespace="http://www.dotnetage.com/XML/Schema/widget" />
  <xs:element name="template">
    <xs:complexType>
      <xs:all>
        <xs:element name="pages" maxOccurs="1" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element ref="wp:page" maxOccurs="unbounded" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="title" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="description" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="keywords" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="shortcutIconUri" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="logoUri" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="copyright" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="style" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="masterPage" type="xs:string" maxOccurs="1" minOccurs="0" />
        <xs:element name="defaultUri" type="xs:string" maxOccurs="1" minOccurs="0" />
      </xs:all>
      <xs:attribute name="top" type="xs:boolean" use="optional" default="false" />
      <xs:attribute name="theme" use="optional" type="xs:string" />
      <xs:attribute name="lang" use="optional" type="xs:string" />
      <xs:attribute name="type" use="optional" type="wb:webtypes" default="Public"  />
      <xs:attribute name="allowNewUser" use="optional" type="xs:boolean" default="true" />
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="webtypes">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Public" />
      <xs:enumeration value="Team" />
      <xs:enumeration value="Personal" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
